﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage"  Debug=true%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ViewData學習
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
<%
    IQueryable<Asp.netMvc.Models.tblRouteD> Data = (IQueryable<Asp.netMvc.Models.tblRouteD> )ViewData["TestData"];

     %>


<%
    Repeater1.DataSource = Data;
    Repeater1.DataBind();
     %>

    <h2>ViewData學習
    
    是一个字典表可以保存各种变量
    
    </h2>
<%=ViewData["Data"]%>
<ul>


<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li>
<%#Eval("站名") %>
</li>
</ItemTemplate>
        </asp:Repeater>
</ul>



</asp:Content>
